<h2>Insert new menu</h2>
<form method="POST" action=<?php echo site_url() . "/menu/menu_controller/update/" . $menu_id; ?>>
    <table cellpadding="0" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>Insert new menu option</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            <?php
                if (!empty($menus)) {
            ?>                                                              
                <tr>
                    <td>Parent menu</td>
                    <td>
                        <select name="parent">
                            <option value="0"></option>
                            <?php
                                foreach ($menus as $key => $menu) {
                            ?>
                                    <option value=<?php echo $menu['menu_id'] ?>><?php echo $menu['title'] ?></option>
                            <?php
                                }
                            ?>
                        </select>                                                              
                    </td>
                </tr>
            <?php
                }
            ?>
            <?php
                if(!empty($languages)) {
            ?>
                <tr>
                    <td>Language</td>
                    <td>
                        <select name="language">
                                <option value=<?php echo $language['language_id']; ?>><?php echo $language['name']; ?></option>
                                <?php
                                    foreach($languages as $key => $language) {
                                ?>
                                    <option value=<?php echo $language['language_id']; ?>><?php echo $language['name']; ?></option>
                                <?php
                                    }
                                ?>
                        </select>
                    </td>
                </tr>
            <?php
                }
            ?>                
            <tr>
                <td>Name</td>
                <td><input type="text" name="name" value="<?php echo $name; ?>" /></td>
            </tr>
            <tr>
                <td>Title</td>
                <td><input type="text" name="title" value="<?php echo $title; ?>" /></td>
            </tr>							
        </tbody>
        <tfoot>
            <tr>
                <td colspan="2">
                    <button>Add menu</button>
                </td>
            </tr>
        </tfoot>
    </table>
</form>